package top.lshaci.learning.springboot.redis;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * RedisApplication
 *
 * @author lshaci
 * @since 1.0.0
 */
@EnableScheduling
@SpringBootApplication
public class RedisApplication {

    public static void main(String[] args) {
        SpringApplication.run(RedisApplication.class, args);
    }

    @Component
    public class Hold {

        @Scheduled(cron = "0 0 * * * ?")
        public void hold() {
            System.err.println("hold");
        }
    }
}
